<script type="text/javascript" >
    stFacebookToolbox.load_tooltip();
    stFacebookToolbox.on_submitform('#settingForm');
    stFacebookToolbox.shortAction();
    stFacebookToolbox.sortColumn();

</script>
<div class="w100p bgl">
    <div class="w100p bgr p5b">
                <ul class="menu_right">
                      <li>
                          <a href="javascript:void(0);" onclick="stFacebookToolboxcustom.loadPage('user_analytics');" id="active_users">Active Users</a>
                    </li>
                    <li class="current">
                          <a href="javascript:void(0);" onclick="stFacebookToolboxcustom.loadPage('user_list');" id="user_list">User List</a>
                    </li>
                    <li>
                        <a style="cursor: pointer;top:0px;" onclick="stFacebookToolboxcustom.update_user_info();" class="button add-new-h2 anchor">
                       <b>Update user info</b>
                    </a>
                    </li>
                    </ul>
        <input type="hidden" id="picture" value="<?php echo $plugin_url;?>images/mini-loading.gif" />
        <p align="center" id="update_user_info" align="center"></p>
<table class="widefat" cellspacing="0">
                <thead>
                    <tr>
                        <?php print_column_headers('stFacebookToolbox_stFacebookToolbox'); ?>
                    </tr>
                </thead>

                <tbody>
                <?php
                if (count($results) > 0) {
                    $tr_class = "";
                    $upload_data = wp_upload_dir();
                    foreach ($results as $result) {
                        if( empty($tr_class) || $tr_class == "class='bg_gray2'"){
                            $tr_class = "class='bg_gray1'";
                        }else{
                            $tr_class = "class='bg_gray2'";
                        }
                        echo "<tr id='$result->uid' $tr_class >"
                        . "<td><img src='$result->pic_small' style='cursor:pointer;' onclick='window.open(\"http://www.facebook.com/profile.php?id=".$result->uid."\");' />
"
                        . '<div class="row-actions short_action"><span confirm="Are you sure you want to Trash this user ?" id="'.$result->uid.'" short_action="delete" class="trash" style="cursor: pointer;">Trash </span></div></td>'
                        . "<td>" . $result->firstname
                        . "<td>" . $result->lastname . "</td>"
                        . "<td>" . $result->sex . "</td>"
                        . "<td>" . $result->locale . "</td>"
                        . "</tr>"
                        ;
                    }
                }
                ?>
                </tbody>
            </table>
            <div class="page_d">
                <?php echo $pagination?>
                <div class="cl"></div>
            </div>


    </div>
</div>